<!doctype html>
<html lang="zh" xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
<head>
    <meta charset="UTF-8">
    <link href="https://fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet">
    <link href="../static/css/vuetify.min.css" rel="stylesheet">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
    <script src="../static/js/vue.js"></script>
    <script src="../static/js/vuetify.js"></script>
    <script src="../static/js/jquery-1.10.2.min.js"/>
    <script src="../static/js/wangEditor-1.1.0-min.js"></script>
    <link rel="stylesheet" href="../static/css/wangEditor-1.1.0-min.css">
    <script type="text/javascript" src="../js/include.js"></script>
    <link rel="stylesheet" href="../static/js/bootstrap/css/bootstrap.min.css">
    <script src="../static/js/bootstrap/js/bootstrap.min.js"></script>
    <script src="../static/js/axios.min.js"></script>
    <script type="text/javascript" src="../js/includepublish.js"></script>
    <script src="../static/js/axios.min.js"></script>
    <title>发表帖子</title>
    <style>
        body {
            background-color: #F6F6F6;
        }
    </style>

</head>
<body>
<div id="headerbody"></div>
<div id="publish"></div>
<div id="footerbody"></div>

</body>

<script>
    function format(publicationTime) {
        var dateTypeDate = "";
        var date = new Date();
        date.setTime(publicationTime);
        dateTypeDate += date.getFullYear();   //年
        dateTypeDate += "-" + date.getMonth(); //月
        dateTypeDate += "-" + date.getDate();   //日
        dateTypeDate += " " + date.getHours();   //日
        dateTypeDate += ":" + date.getMinutes();   //日
        dateTypeDate += ":" + date.getSeconds();   //日
        return dateTypeDate;
    }

    $(function () {
        $.ajax({
            url: "/LxCommunity/content/findbykey/1",
            type: 'get',
            scriptCharset: 'utf-8',
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (data) {
                $("#content_findbykey").html(data.content);
                $("#userinfo").height($("#contentparent").height());
                $("#publishtime").empty().append("发布于：" + format(data.publicationTime))
                $("#Release_user").empty().append(data.user.name)
                $("#Release_user_image").attr("src", data.user.image)
                $(".userimage").attr("src", data.user.image)


            }
        });
        window.onresize = function () {
            $("#userinfo").css("height", $("#content_findbykey").height() + 48);
        }


    });

</script>
</html>




